package com.bgybmi.util;

import java.util.ResourceBundle;
/**
 * @author hecore
 * @description read property and return the correct value
 */
public class RescouceReader {
    //create a private valiable for use
	private static RescouceReader r=null;
	private static String configName=null;
	private static ResourceBundle res=null;
	private RescouceReader(){};
	//static factory
    public static RescouceReader getInsance(){
    	if(null==r){
    		r=new RescouceReader();
    	}
    	return RescouceReader.r;
    }
    //Bundle get resources.
    public static ResourceBundle getProperties(String configName){
    	res=ResourceBundle.getBundle(configName);   	
        return res;
    }
    public static String getValue(String key){
    	String value=res.getString(key);
    	return value;
    }

}

